﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Net;
using System.ComponentModel;
using System.Xml;
using System.Data.SqlClient;

/// <summary>
/// Summary description for clsImport
/// </summary>
public class clsImport
{
	public clsImport()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    public static string nothing()
    {
        string URLString = "http://feedmonger.mochimedia.com/feeds/query/?q=(((recommendation%3A%3E%3D4)%20and%20not%20category%3Afighting)%20and%20not%20category%3Ashooting)%20and%20rating%3Aeveryone&format=atom&limit=10";
        //URLString = @"C:\Users\Ed\Documents\Visual Studio 2013\WebSites\WebSite1\admin\query.xml";

        //System.Net.WebClient wClient = new System.Net.WebClient();
        //string result = wClient.DownloadString(URLString);
        //return result;

        string result = "";

        //XmlReader myRead = XmlReader.Create(URLString);
        //while (myRead.Read())
        //{
        //    result += "test";
        //}



        XmlDataDocument xdoc = new XmlDataDocument();//xml doc used for xml parsing
        xdoc.Load(URLString);//loading XML in xml doc

        XmlNamespaceManager manager = new XmlNamespaceManager(xdoc.NameTable);
        manager.AddNamespace("ns", "http://www.w3.org/2005/Atom");
        manager.AddNamespace("media", "http://search.yahoo.com/mrss/");

        //xdoc.Load(@"C:\Users\Ed\Documents\Visual Studio 2013\WebSites\WebSite1\admin\query.xml");

        XmlNodeList xNodelst = xdoc.DocumentElement.SelectNodes("ns:entry", manager);//reading node so that we can traverse thorugh the XML


        foreach (XmlNode xNode in xNodelst)//traversing XML 
        {
            result += "\n" + xNode.Name.ToString() + "\n";
            result += "title: " + xNode.SelectNodes("ns:title", manager)[0].InnerText + "\n";
            //result += xNode.SelectNodes("ns:author/name", manager)[0].InnerText + "\n";
            result += "id: " + xNode.SelectNodes("ns:id", manager)[0].InnerText + "\n";
            result += "url: " + xNode.SelectNodes("media:player", manager)[0].Attributes["url"].InnerText + "\n";
            result += "height: " + xNode.SelectNodes("media:player", manager)[0].Attributes["height"].InnerText + "\n";
            result += "width: " + xNode.SelectNodes("media:player", manager)[0].Attributes["width"].InnerText + "\n";
            result += "thumb: " + xNode.SelectNodes("media:thumbnail", manager)[0].Attributes["url"].InnerText + "\n";
            result += "desc: " + xNode.SelectNodes("media:description", manager)[0].InnerText + "\n";
            result += "key: " + xNode.SelectNodes("media:keywords", manager)[0].InnerText + "\n";
            result += "key: " + xNode.SelectNodes("ns:category", manager)[0].Attributes["term"].InnerText + "\n";
        }



        return result;
    }
    public static string ImportMochiGames()
    {
        string URLString = "http://feedmonger.mochimedia.com/feeds/query/?q=(((recommendation%3A%3E%3D4)%20and%20not%20category%3Afighting)%20and%20not%20category%3Ashooting)%20and%20rating%3Aeveryone&format=atom&limit=10";
        //URLString = @"C:\Users\Ed\Documents\Visual Studio 2013\WebSites\WebSite1\admin\query.xml";


        string result = "";

        XmlDataDocument xdoc = new XmlDataDocument();//xml doc used for xml parsing
        xdoc.Load(URLString);//loading XML in xml doc

        XmlNamespaceManager manager = new XmlNamespaceManager(xdoc.NameTable);
        manager.AddNamespace("ns", "http://www.w3.org/2005/Atom");
        manager.AddNamespace("media", "http://search.yahoo.com/mrss/");

        XmlNodeList xNodelst = xdoc.DocumentElement.SelectNodes("ns:entry", manager);//reading node so that we can traverse thorugh the XML


        foreach (XmlNode xNode in xNodelst)//traversing XML 
        {
            //result += "\n" + xNode.Name.ToString() + "\n";
            string sTitle = xNode.SelectNodes("ns:title", manager)[0].InnerText;
            string sID = xNode.SelectNodes("ns:id", manager)[0].InnerText;
            string sURL = xNode.SelectNodes("media:player", manager)[0].Attributes["url"].InnerText;
            int iHeight = Convert.ToInt32(xNode.SelectNodes("media:player", manager)[0].Attributes["height"].InnerText);
            int iWidth = Convert.ToInt32(xNode.SelectNodes("media:player", manager)[0].Attributes["width"].InnerText);
            string sThumb = xNode.SelectNodes("media:thumbnail", manager)[0].Attributes["url"].InnerText;
            string sDesc = xNode.SelectNodes("media:description", manager)[0].InnerText;
            string sKey = xNode.SelectNodes("media:keywords", manager)[0].InnerText;
            string sCat = xNode.SelectNodes("ns:category", manager)[0].Attributes["term"].InnerText;

            clsImport myM = new clsImport();
            myM.AddGame(sTitle, sID, sURL, iHeight, iWidth, sThumb, sDesc, sKey, sCat);
        }

        return result;
    }
    public static string ImportMochiGames(string URLString)
    {
        //string URLString = "http://feedmonger.mochimedia.com/feeds/query/?q=(((recommendation%3A%3E%3D4)%20and%20not%20category%3Afighting)%20and%20not%20category%3Ashooting)%20and%20rating%3Aeveryone&format=atom&limit=10";
        //URLString = @"C:\Users\Ed\Documents\Visual Studio 2013\WebSites\WebSite1\admin\query.xml";


        string result = "";

        XmlDataDocument xdoc = new XmlDataDocument();//xml doc used for xml parsing
        xdoc.Load(URLString);//loading XML in xml doc

        XmlNamespaceManager manager = new XmlNamespaceManager(xdoc.NameTable);
        manager.AddNamespace("ns", "http://www.w3.org/2005/Atom");
        manager.AddNamespace("media", "http://search.yahoo.com/mrss/");

        XmlNodeList xNodelst = xdoc.DocumentElement.SelectNodes("ns:entry", manager);//reading node so that we can traverse thorugh the XML


        foreach (XmlNode xNode in xNodelst)//traversing XML 
        {
            //result += "\n" + xNode.Name.ToString() + "\n";
            string sTitle = xNode.SelectNodes("ns:title", manager)[0].InnerText;
            string sID = xNode.SelectNodes("ns:id", manager)[0].InnerText;
            string sURL = xNode.SelectNodes("media:player", manager)[0].Attributes["url"].InnerText;
            int iHeight = Convert.ToInt32(xNode.SelectNodes("media:player", manager)[0].Attributes["height"].InnerText);
            int iWidth = Convert.ToInt32(xNode.SelectNodes("media:player", manager)[0].Attributes["width"].InnerText);
            string sThumb = xNode.SelectNodes("media:thumbnail", manager)[0].Attributes["url"].InnerText;
            string sDesc = xNode.SelectNodes("media:description", manager)[0].InnerText;
            string sKey = xNode.SelectNodes("media:keywords", manager)[0].InnerText;
            string sCat = xNode.SelectNodes("ns:category", manager)[0].Attributes["term"].InnerText;

            clsImport myM = new clsImport();
            myM.AddGame(sTitle, sID, sURL, iHeight, iWidth, sThumb, sDesc, sKey, sCat);
        }

        return result;
    }
    public static string ImportMochiGames(string URLString, bool bDownload = false)
    {
        string result = "";

        XmlDataDocument xdoc = new XmlDataDocument();//xml doc used for xml parsing
        xdoc.Load(URLString);//loading XML in xml doc

        XmlNamespaceManager manager = new XmlNamespaceManager(xdoc.NameTable);
        manager.AddNamespace("ns", "http://www.w3.org/2005/Atom");
        manager.AddNamespace("media", "http://search.yahoo.com/mrss/");

        XmlNodeList xNodelst = xdoc.DocumentElement.SelectNodes("ns:entry", manager);//reading node so that we can traverse thorugh the XML


        foreach (XmlNode xNode in xNodelst)//traversing XML 
        {
            //result += "\n" + xNode.Name.ToString() + "\n";
            string sTitle = xNode.SelectNodes("ns:title", manager)[0].InnerText;
            string sID = xNode.SelectNodes("ns:id", manager)[0].InnerText;
            string sURL = xNode.SelectNodes("media:player", manager)[0].Attributes["url"].InnerText;
            int iHeight = Convert.ToInt32(xNode.SelectNodes("media:player", manager)[0].Attributes["height"].InnerText);
            int iWidth = Convert.ToInt32(xNode.SelectNodes("media:player", manager)[0].Attributes["width"].InnerText);
            string sThumb = xNode.SelectNodes("media:thumbnail", manager)[0].Attributes["url"].InnerText;
            string sDesc = xNode.SelectNodes("media:description", manager)[0].InnerText;
            string sKey = xNode.SelectNodes("media:keywords", manager)[0].InnerText;
            string sCat = xNode.SelectNodes("ns:category", manager)[0].Attributes["term"].InnerText;

            clsImport myM = new clsImport();
            myM.AddGame(sTitle, sID, sURL, iHeight, iWidth, sThumb, sDesc, sKey, sCat, "", "", bDownload);
        }

        return result;
    }
    public static string ImportFGFYWGames(string URLString, bool bDownload = false)
    {
        string result = "";

        XmlDataDocument xdoc = new XmlDataDocument();//xml doc used for xml parsing
        xdoc.Load(URLString);//loading XML in xml doc

        XmlNamespaceManager manager = new XmlNamespaceManager(xdoc.NameTable);
        manager.AddNamespace("ns", "http://www.w3.org/2005/Atom");
        manager.AddNamespace("media", "http://search.yahoo.com/mrss/");
        manager.AddNamespace("xhtml", "http://www.w3.org/1999/xhtml");

        XmlNodeList xNodelst = xdoc.DocumentElement.SelectNodes("ns:entry", manager);//reading node so that we can traverse thorugh the XML


        foreach (XmlNode xNode in xNodelst)//traversing XML 
        {
            string sLThumb = "";
            int iHeight = 640;
            int iWidth = 480;
            string sDesc = "";
            string sKey = "";
            string sCat = "";
            string sCont = "";
            string sTitle = xNode.SelectNodes("ns:title", manager)[0].InnerText;
            string sID = xNode.SelectNodes("ns:link", manager)[0].InnerText;
            string sURL = xNode.SelectNodes("ns:swf", manager)[0].InnerText;
            string sThumb = xNode.SelectNodes("ns:smallThumb", manager)[0].InnerText;
            try { sLThumb = xNode.SelectNodes("ns:largeThumb", manager)[0].InnerText; }
            catch { }

            XmlNodeList nodeList = xNode.SelectNodes("ns:summary/*", manager);
            XmlNodeList nlAgain = nodeList[0].ChildNodes;
            foreach (XmlNode node in nlAgain)
            {
                if (node.Name == "b")
                {
                    if (node.InnerText.ToLower().Contains("description:"))
                    {
                        sDesc = node.NextSibling.InnerText;
                    }
                    if (node.InnerText.ToLower().Contains("controls:"))
                    {
                        sCont = node.NextSibling.InnerText;
                    }
                    if (node.InnerText.ToLower().Contains("tags:"))
                    {
                        sKey = node.NextSibling.InnerText;
                    } if (node.InnerText.ToLower().Contains("category"))
                    {
                        sCat = node.NextSibling.InnerText.Trim();
                    }
                    if (node.InnerText.ToLower().Contains("resolution:"))
                    {
                        string sRes = node.NextSibling.InnerText;
                        iWidth = Convert.ToInt32(sRes.Split("x".ToCharArray())[0]);
                        iHeight = Convert.ToInt32(sRes.Split("x".ToCharArray())[1]);
                    }
                }
                //string sSummary = xNode.SelectNodes("ns:summary", manager)[0].InnerXml;
                //iHeight = Convert.ToInt32(xNode.SelectNodes("media:player", manager)[0].Attributes["height"].InnerText);
                //iWidth = Convert.ToInt32(xNode.SelectNodes("media:player", manager)[0].Attributes["width"].InnerText);
                //sDesc = xNode.SelectNodes("media:description", manager)[0].InnerText;
                //sKey = xNode.SelectNodes("media:keywords", manager)[0].InnerText;
                //sCat = xNode.SelectNodes("ns:category", manager)[0].Attributes["term"].InnerText;
            }
            clsImport myM = new clsImport();
            //if(bDownload)
            //{
            //    string latinTitle=sTitle.Replace(" ","_").Replace(":","_").Replace(",","_").Replace("'","_");
            //    //swf
            //    sURL = myM.DownloadFile(latinTitle, sURL, fileType.swf);
            //    //thumb
            //    sThumb = myM.DownloadFile(latinTitle, sThumb, fileType.thumb);
            //    //largeimg
            //    if (sLThumb.Length>0)
            //        sLThumb = myM.DownloadFile(latinTitle, sLThumb, fileType.img);
            //}
            myM.AddGame(sTitle, sID, sURL, iHeight, iWidth, sThumb, sDesc, sKey, sCat, sCont, sLThumb, bDownload);
        }

        return result;
    }
    public enum fileType{swf,thumb,img};
    public string DownloadFile(string latin_title, string fileUrl, fileType fileDest)
    {
        string targetDir = HttpContext.Current.Server.MapPath("~");
        string targetFile = "";
        string retVal = fileUrl;

        switch(fileDest)
        {
            case fileType.swf:
                targetDir += "swf\\";
                retVal = "/swf/";
                break;
            case fileType.thumb:
                targetDir += "thumb\\";
                retVal = "/thumb/";
                break;
            case fileType.img:
                targetDir += "img\\";
                retVal = "/img/";
                break;
        }

        // masage the target name
        targetFile = fileUrl.Split('.').Last();
        targetFile = targetFile.Split('?')[0];
        targetFile = latin_title + "." + targetFile;

        try
        {
            using (System.Net.WebClient Client = new System.Net.WebClient())
            {
                Client.DownloadFile(fileUrl, targetDir + targetFile);
            }
            return retVal + targetFile;
        }
        catch(Exception e)
        {  return fileUrl; }
    }
    public static string ImportFGFYWGames(string URLString)
    {
        string result = "";

        XmlDataDocument xdoc = new XmlDataDocument();//xml doc used for xml parsing
        xdoc.Load(URLString);//loading XML in xml doc

        XmlNamespaceManager manager = new XmlNamespaceManager(xdoc.NameTable);
        manager.AddNamespace("ns", "http://www.w3.org/2005/Atom");
        manager.AddNamespace("media", "http://search.yahoo.com/mrss/");
        manager.AddNamespace("xhtml", "http://www.w3.org/1999/xhtml");

        XmlNodeList xNodelst = xdoc.DocumentElement.SelectNodes("ns:entry", manager);//reading node so that we can traverse thorugh the XML


        foreach (XmlNode xNode in xNodelst)//traversing XML 
        {
            string sLThumb = "";
            int iHeight = 640;
            int iWidth = 480;
            string sDesc = "";
            string sKey = "";
            string sCat = "";
            string sCont = "";
            string sTitle = xNode.SelectNodes("ns:title", manager)[0].InnerText;
            string sID = xNode.SelectNodes("ns:link", manager)[0].InnerText;
            string sURL = xNode.SelectNodes("ns:swf", manager)[0].InnerText;
            string sThumb = xNode.SelectNodes("ns:smallThumb", manager)[0].InnerText;
            try { sLThumb = xNode.SelectNodes("ns:largeThumb", manager)[0].InnerText; }
            catch { }

            XmlNodeList nodeList = xNode.SelectNodes("ns:summary/*", manager);
            XmlNodeList nlAgain = nodeList[0].ChildNodes;
            foreach (XmlNode node in nlAgain)
            {
                if (node.Name == "b")
                {
                    if (node.InnerText.ToLower().Contains("description:"))
                    {
                        sDesc = node.NextSibling.InnerText;
                    }
                    if (node.InnerText.ToLower().Contains("controls:"))
                    {
                        sCont = node.NextSibling.InnerText;
                    }
                    if (node.InnerText.ToLower().Contains("tags:"))
                    {
                        sKey = node.NextSibling.InnerText;
                    } if (node.InnerText.ToLower().Contains("category"))
                    {
                        sCat = node.NextSibling.InnerText.Trim();
                    }
                    if (node.InnerText.ToLower().Contains("resolution:"))
                    {
                        string sRes = node.NextSibling.InnerText;
                        iWidth = Convert.ToInt32(sRes.Split("x".ToCharArray())[0]);
                        iHeight = Convert.ToInt32(sRes.Split("x".ToCharArray())[1]);
                    }
                }
                //string sSummary = xNode.SelectNodes("ns:summary", manager)[0].InnerXml;
                //iHeight = Convert.ToInt32(xNode.SelectNodes("media:player", manager)[0].Attributes["height"].InnerText);
                //iWidth = Convert.ToInt32(xNode.SelectNodes("media:player", manager)[0].Attributes["width"].InnerText);
                //sDesc = xNode.SelectNodes("media:description", manager)[0].InnerText;
                //sKey = xNode.SelectNodes("media:keywords", manager)[0].InnerText;
                //sCat = xNode.SelectNodes("ns:category", manager)[0].Attributes["term"].InnerText;
            }
            clsImport myM = new clsImport();
            myM.AddGame(sTitle, sID, sURL, iHeight, iWidth, sThumb, sDesc, sKey, sCat, sCont, sLThumb);
        }

        return result;
    }
    public static string ImportKonGames(string URLString, bool bDownload = false)
    {
        string result = "";

        XmlDataDocument xdoc = new XmlDataDocument();//xml doc used for xml parsing
        xdoc.Load(URLString);//loading XML in xml doc

        XmlNamespaceManager manager = new XmlNamespaceManager(xdoc.NameTable);
        manager.AddNamespace("ns", "http://www.w3.org/2005/Atom");
        manager.AddNamespace("media", "http://search.yahoo.com/mrss/");

        //XmlNodeList xNodelst = xdoc.DocumentElement.SelectNodes("ns:game", manager);//reading node so that we can traverse thorugh the XML
        XmlNodeList xNodelst = xdoc.DocumentElement.SelectNodes("game");//reading node so that we can traverse thorugh the XML


        foreach (XmlNode xNode in xNodelst)//traversing XML 
        {
            string sLThumb = "";
            string sTitle = xNode.SelectNodes("title")[0].InnerText;
            string sID = xNode.SelectNodes("id")[0].InnerText;
            string sURL = xNode.SelectNodes("flash_file")[0].InnerText;
            int iHeight = Convert.ToInt32(xNode.SelectNodes("height")[0].InnerText);
            int iWidth = Convert.ToInt32(xNode.SelectNodes("width")[0].InnerText);
            string sThumb = xNode.SelectNodes("thumbnail")[0].InnerText;
            string sDesc = xNode.SelectNodes("description")[0].InnerText;
            string sKey = xNode.SelectNodes("category")[0].InnerText;
            string sCat = xNode.SelectNodes("category")[0].InnerText;
            string sCont = xNode.SelectNodes("instructions")[0].InnerText;
            try { sLThumb = xNode.SelectNodes("screenshot")[0].InnerText; }
            catch { }

            clsImport myM = new clsImport();
            myM.AddGame(sTitle, sID, sURL, iHeight, iWidth, sThumb, sDesc, sKey, sCat, sCont, sLThumb, bDownload);
        }

        return result;
    }
    public static string ImportKonGames(string URLString)
    {
        string result = "";

        XmlDataDocument xdoc = new XmlDataDocument();//xml doc used for xml parsing
        xdoc.Load(URLString);//loading XML in xml doc

        XmlNamespaceManager manager = new XmlNamespaceManager(xdoc.NameTable);
        manager.AddNamespace("ns", "http://www.w3.org/2005/Atom");
        manager.AddNamespace("media", "http://search.yahoo.com/mrss/");

        //XmlNodeList xNodelst = xdoc.DocumentElement.SelectNodes("ns:game", manager);//reading node so that we can traverse thorugh the XML
        XmlNodeList xNodelst = xdoc.DocumentElement.SelectNodes("game");//reading node so that we can traverse thorugh the XML


        foreach (XmlNode xNode in xNodelst)//traversing XML 
        {
            string sLThumb = "";
            string sTitle = xNode.SelectNodes("title")[0].InnerText;
            string sID = xNode.SelectNodes("id")[0].InnerText;
            string sURL = xNode.SelectNodes("flash_file")[0].InnerText;
            int iHeight = Convert.ToInt32(xNode.SelectNodes("height")[0].InnerText);
            int iWidth = Convert.ToInt32(xNode.SelectNodes("width")[0].InnerText);
            string sThumb = xNode.SelectNodes("thumbnail")[0].InnerText;
            string sDesc = xNode.SelectNodes("description")[0].InnerText;
            string sKey = xNode.SelectNodes("category")[0].InnerText;
            string sCat = xNode.SelectNodes("category")[0].InnerText;
            string sCont = xNode.SelectNodes("instructions")[0].InnerText;
            try { sLThumb = xNode.SelectNodes("screenshot")[0].InnerText; }
            catch { }

            clsImport myM = new clsImport();
            myM.AddGame(sTitle, sID, sURL, iHeight, iWidth, sThumb, sDesc, sKey, sCat, sCont, sLThumb);
        }

        return result;
    }
    public void AddGame(string title, string id, string url, int height, int width, string thumb, string desc, string key, string cat, string cont = "", string large_img = "", bool bDownload = false)
    {
        if (bDownload)
        {
            clsImport myM = new clsImport();
            string latinTitle = title.Replace(" ", "_").Replace(":", "_").Replace(",", "_").Replace("'", "_");
            //swf
            url = myM.DownloadFile(latinTitle, url, fileType.swf);
            //thumb
            thumb = myM.DownloadFile(latinTitle, thumb, fileType.thumb);
            //largeimg
            if (large_img.Length > 0)
                large_img = myM.DownloadFile(latinTitle, large_img, fileType.img);
        }

        //string strConn = "Data Source=SQL5007.myASP.NET;Initial Catalog=DB_9AEC9D_game;Persist Security Info=True;User ID=DB_9AEC9D_game_admin;Password=Qwerty123";
        string strConn = System.Configuration.ConfigurationManager.ConnectionStrings["gamesConnectionString"].ConnectionString;

        // trim strings
        if (cat.Length > 253) { cat = cat.Substring(0, 253); }
        if (title.Length > 253) { title = title.Substring(0, 253); }
        if (url.Length > 253) { url = url.Substring(0, 253); }
        if (thumb.Length > 253) { thumb = thumb.Substring(0, 253); }
        if (key.Length > 1022) { key = key.Substring(0, 1022); }
        if (desc.Length > 1022) { desc = desc.Substring(0, 1022); }
        if (cont.Length > 1022) { cont = cont.Substring(0, 1022); }
        if (id.Length > 253) { id = id.Substring(0, 253); }
        if (large_img.Length > 253) { large_img = large_img.Substring(0, 253); }
        //key = clsFunct.EscapeText(key);
        //desc = clsFunct.EscapeText(desc);

        //using (var conn = new SqlConnection(strConn))
        //using (var command = new SqlCommand("AddGame", conn)
        //{
        //    CommandType = System.Data.CommandType.StoredProcedure
        //})
        SqlConnection conn = new SqlConnection(strConn);
        SqlCommand command = new SqlCommand("AddGame", conn);
        command.CommandType = System.Data.CommandType.StoredProcedure;
        command.Parameters.Add(new SqlParameter("@cat", System.Web.HttpUtility.HtmlEncode(cat)));
        command.Parameters.Add(new SqlParameter("@title", System.Web.HttpUtility.HtmlEncode(title)));
        command.Parameters.Add(new SqlParameter("@swf", System.Web.HttpUtility.HtmlEncode(url)));
        command.Parameters.Add(new SqlParameter("@thumb", System.Web.HttpUtility.HtmlEncode(thumb)));
        command.Parameters.Add(new SqlParameter("@key", System.Web.HttpUtility.HtmlEncode(key)));
        command.Parameters.Add(new SqlParameter("@desc", System.Web.HttpUtility.HtmlEncode(desc)));
        command.Parameters.Add(new SqlParameter("@cont", System.Web.HttpUtility.HtmlEncode(cont))); // commented out because I dont have it yet
        command.Parameters.Add(new SqlParameter("@height", System.Web.HttpUtility.HtmlEncode(height)));
        command.Parameters.Add(new SqlParameter("@width", System.Web.HttpUtility.HtmlEncode(width)));
        command.Parameters.Add(new SqlParameter("@game_tag", System.Web.HttpUtility.HtmlEncode(id)));
        command.Parameters.Add(new SqlParameter("@large_img", System.Web.HttpUtility.HtmlEncode(large_img)));
        {
            conn.Open();
            command.ExecuteNonQuery();
            conn.Close();
        }
    }

}